package com.zengqingfa.dubbo.mall.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.zengqingfa.dubbo.mall.entity.UserAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * @fileName: OrderService
 * @author: zengqf3
 * @date: 2021-4-12 15:02
 * @description:
 */
@Component
public class OrderServiceXml implements OrderService {

    @Autowired
    UserService userService;

    /**
     * 初始化订单，查询用户的所有地址并返回
     * @param userId
     * @return
     */
    @Override
    public List<UserAddress> initOrder(String userId) {
        return userService.getUserAddressList(userId);
    }
}
